import { QuestionCollection } from "inquirer";

const questions: QuestionCollection = [
  {
    type: "number",
    name: "count",
    message: "购买 几 次0元产品?",
    default: '5',
    validate: function (value) {
      const n = parseFloat(value)
      var valid = !isNaN(n) && n <= 5;
      return valid || '请输入数字而且数字小于 5';
    },
    filter: Number,
  },
];

export { questions };
